package com.csdj.job;

import java.io.IOException;
import java.util.HashMap;
import java.util.Map;

public class Test {
    public static void main(String[] args) {
        final Paraser paraser = new Paraser();
        //读取模板
        String template = paraser.readTemplate("template.txt");
        final Cat cat = new Cat();
        cat.setName("傻B");
        cat.setMaster("傻C");
        cat.setType("傻猴");
        //替换
        String res = paraser.replaceParse(template,cat);
        try {
            //保存
            paraser.writeResult(res,"result.txt");
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
}
